//
//  RMMOrderShuoMingTableViewCell.m
//  Romomo
//
//  Created by puman on 2016/10/24.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMOrderShuoMingTableViewCell.h"

@implementation RMMOrderShuoMingTableViewCell
    {
        UILabel *_nameLabel;
    }
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, 80, 54)];
        _nameLabel.text = @"申请说明";
        _nameLabel.textColor = COLORFROMCODE(0x303137, 1);
        _nameLabel.font = kFont(16);
        [self.contentView addSubview:_nameLabel];
        
        _textF = [[UITextField alloc] initWithFrame:CGRectMake(_nameLabel.right + kRow, 0, 100, 54)];
        _textF.text = @"最多200字";
        _textF.textColor = COLORFROMCODE(0xD7D7D7, 1);
        _textF.font = kFont(14);
        [self.contentView addSubview:_textF];
        
        _textView = [[UITextView alloc] initWithFrame:CGRectMake(15, _nameLabel.bottom, kScreenWideth - 30, 100)];
        _textView.text = @"最多200字";
        _textView.textColor = COLORFROMCODE(0xD7D7D7, 1);
        _textView.font = kFont(14);
        [self.contentView addSubview:_textView];
        UIButton *button = [RMMFileManager addInputViewForTextField];
        BUTTON_S(button, doneBut);
        _textView.inputAccessoryView= button;


    }
    return self;
}
- (void)doneBut{
    [_textView resignFirstResponder];
    if ([_textView.text isEqualToString:@""]) {
        _textView.text = @"最多200字";
        _textView.textColor = COLORFROMCODE(0xD7D7D7, 1);
    }

}
- (void)setStat:(NSString *)stat{
    if ([stat isEqualToString:@"0"]) {
        _textView.hidden = YES;
        _textF.hidden = NO;
    } else {
        _textView.hidden = NO;
        _textF.hidden = YES;
    }
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
